package demo2;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: XMQ
 * Date: 2022-05-13
 * Time: 20:35
 */
//object
class TestDemo{
    public void func(){
        demo1.Test test = new demo1.Test();
//        System.out.println(super.a);//不同包类的非子类不能访问a
    }
}
public class Test extends demo1.Test {

//    public  void func2(){
//        System.out.println(super.a);
//    }
    public void func(){
        System.out.println(super.a);
    }

    public static void main(String[] args) {
        demo1.Test test = new demo1.Test();
        test.func();

    }
}
